<template>
  <div class="login-container">
    <h2>登录</h2>
    <form @submit.prevent="handleLogin" class="login-form">
      <div class="form-item">
        <label>用户名</label>
        <input 
          type="text" 
          v-model="username" 
          required 
          autocomplete="username"
        />
      </div>
      <div class="form-item">
        <label>密码</label>
        <input 
          type="password" 
          v-model="password" 
          required 
          autocomplete="current-password"
        />
      </div>
      <button type="submit">登录</button>
    </form>
  </div>
</template>

<script setup lang="ts">
import { useLogin } from '@/ts/auth/login'
import '@/css/auth/login.css'

const { username, password, handleLogin } = useLogin()
</script> 